<template>
    <div class="app">
        <merchantHeader/>
        <div class="back">
            <div class="con">
              <div class="pxes"></div>
              <div class="listneo">
                <businessL/>
                <div class="conres">
                  <div class="ra"><h3>退货地址管理</h3> </div>
                  <div class="yuansdj">
                  <div class="forms">
                    <el-form :model="ruleForm" :inline="true" :rules="rules" ref="ruleForm" label-width="200px" class="demo-ruleForm">
                      <el-form-item label="姓名" prop="name">
                        <el-input size="mini" v-model="ruleForm.name" style="width: 100%;"></el-input>
                      </el-form-item>
                      <el-form-item label="电话" prop="posin">
                        <el-input size="mini" v-model="ruleForm.posin" style="width: 100%;"></el-input>
                      </el-form-item>
                      
                      <el-form-item label="邮编" prop="bian">
                        <el-input size="mini" v-model="ruleForm.bian" style="width: 100%;"></el-input>
                      </el-form-item>
                   

                      <el-form-item label="详细地址" prop="desc">
                        <el-input size="mini" type="textarea" v-model="ruleForm.desc"></el-input>
                      </el-form-item>
                      <el-form-item style="margin-left: 347px;">
                        <el-button size="mini" type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
                        <el-button size="mini" @click="resetForm('ruleForm')">重置</el-button>
                      </el-form-item>
                    </el-form>
                  </div>
                  <div class="dzlist">
                    <el-table
                      :header-cell-style="{background:'#D6DCE1',color:'#2D405E'}" style="width: 873px;margin:15px auto"
                      :data="tableData"
                     >
                      <el-table-column
                        prop="name"
                        label="收件人姓名">
                      </el-table-column>
                      <el-table-column
                        prop="date"
                        label="收件人电话"
                       >
                      </el-table-column>
                      <el-table-column
                        prop="eee"
                        label="收件人邮编"
                       
                        >
                      </el-table-column>
                      <el-table-column
                        prop="address"
                        label="收件人地址"
                  
                        >
                      </el-table-column>
                      <el-table-column
                          label="操作"
                          width="110">
                            <template slot-scope="scope">
                              <el-button style="display:block" @click="handleClick(scope.row)" type="text" size="small">修改</el-button>
                              <el-button style="margin-left:0px;display:block" type="text" size="small">删除</el-button>
                              <el-button style="margin-left:0px" type="text" size="small">设置默认地址</el-button>
                            </template>
                      </el-table-column>
                      
                    </el-table>
                  </div>
                    
                  </div>
                  <businessF/>
                </div>
              </div>
              
            </div>
        </div>
        <Footer/>
    </div>
</template>
<script>
import merchantHeader from '@/components/merchantHeader'
import Footer from '@/components/Footer'
import businessL from '@/components/businessL'
import businessF from '@/components/businessF'
export default {
    components: { 
    merchantHeader,
    Footer,
    businessL,
    businessF
    },
    data() {
      return {
        ruleForm: {
          name: '',
          posin:'',
          bian:'',
          region: '',
          desc: ''
        },
        rules: {
          name: [
            { required: true, message: '请输入您的姓名', trigger: 'blur' }
          ],
          posin : [
            { required: true, message: '请输入您的电话', trigger: 'blur' }
          ],
          desc: [
            { required: true, message: '请输入您的详细地址', trigger: 'blur' }
          ]
        },
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          eee:'wdawed'
          }]
      }
      
    },
    methods: {
      handleClick(){
        alert("查看")
      },
      submitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            alert('submit!');
          } else {
            console.log('error submit!!');
            return false;
          }
        });
      },
      resetForm(formName) {
        this.$refs[formName].resetFields();
      }
    },
}
</script>
<style scoped>
.app  /deep/  .ist_l .ist_c li:nth-child(1) {
    background-color: #ff9381;
    width: 126px;
    height: 50px;
    display: block;
}

.yuansdj /deep/ .el-button--primary:hover {
    background: #fdab9c;
    border-color: #fdab9c;
}
.yuansdj /deep/ .el-button--primary {
    color: #FFF;
    background-color: #ff9381;
    border-color: #ff9381;
}
.back {
    background-color: #f06048
}  
.pxes {
  height: 15px;
}
.back .con {
  width: 1200px;
  margin: 0 auto;
  background-color: #eee;
  padding-bottom: 10px;
} 
.listneo {
  width: 1161px;
  margin: 0px auto;
  display: flex;
  justify-content: space-between;
}
.conres {
  width: 902px;
  border-radius: 6px;
  background-color: #fff
}
.conres .ra h3{
  font-size: 20px;
  color: #f06048;
  padding-left: 14px;
  border-bottom: 1px solid #cecece;
  margin-top: 15px;
  padding-bottom: 10px;
}

</style>